package cn.classTest.mall.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@Component
public class Shop {
    private Long id;
    private String name;
    private String sn;

    private Boolean status = false;
    private Mall mall;

    private Employee employee;
    private Long goodsNumCount;
    private List<Goods> goodsList;
    private String json;

    public String getJson() {
        Map<String, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        map.put("sn",sn);
        map.put("status",status);
        map.put("employee",employee);
        map.put("expression",status);
        map.put("goodsNumCount",goodsNumCount);
        map.put("goodsList",goodsList);

        return JSON.toJSONString(map);
    }
}
